package com.example.weixin02

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View

class MainActivity : AppCompatActivity(){

//    val top001=findViewById<layout>()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

    }


    fun showF01(){
        val fragmentManager =supportFragmentManager
        val transaction =fragmentManager.beginTransaction()
        transaction.replace(R.id.topFrag,Top01())
        transaction.commit()
    }

    fun showF02(){
        val fragmentManager =supportFragmentManager
        val transaction =fragmentManager.beginTransaction()
        transaction.replace(R.id.topFrag,Top02())
        transaction.commit()
    }

    fun showF03(){
        val fragmentManager =supportFragmentManager
        val transaction =fragmentManager.beginTransaction()
        transaction.replace(R.id.topFrag,Top03())
        transaction.commit()
    }

    fun showF04(){
        val fragmentManager =supportFragmentManager
        val transaction =fragmentManager.beginTransaction()
        transaction.replace(R.id.topFrag,Top04())
        transaction.commit()

    }

}